﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Work3
{
	class Program
	{

		static void Main(String[] args)
		{
			PrimeNumber();
		}


		static void PrimeNumber()
		{
			bool[] number = new bool[101];
			for (int i = 2; i <= 100; i++)
				number[i] = true;
			int num = 1;
			for (int i = 2; i <= 100; i++) 
			{
				if (number[i])
					for (int j = 2; j*i <= 100; j++)
							if (number[i * j])
							{
								number[i * j] = false;
								num++;
							}
			}
			int[] primeNumber = new int[100 - num];
			int n = 0;
			
			for (int i = 2; i <= 100; i++)
			{
				if (number[i])
				{
					primeNumber[n] = i;
					n++;
				}
			}
			Console.WriteLine("总数：" + (primeNumber.Length));
			foreach (int i in primeNumber)
				Console.WriteLine(i);
		}
	}
}
